package com.my.mymafengwo.utils;

import android.util.Log;

import com.my.mymafengwo.base.MyApplication;

/**
 * ***********************************************
 * author:wgh
 * time:2015/12/1 15:27
 * copyright:
 * name:日志的工具类
 * step:1.通过开关，判断是否打印Log信息
 * ***********************************************
 */
public class Logger {
    private static final String TAG = "Logger";

    /**
     * debug级别
     *
     * @param msg
     */
    public static void d(String msg) {
        if (MyApplication.isDebug) {
            Log.d(TAG, msg);
        }
    }

    /**
     * warning级别
     *
     * @param msg
     */
    public static void w(String msg) {
        if (MyApplication.isDebug) {
            Log.w(TAG, msg);
        }
    }

    /**
     * error级别
     *
     * @param msg
     */
    public static void e(String msg) {
        if (MyApplication.isDebug) {
            Log.e(TAG, msg);
        }
    }

}

